package com.iris.live.services.report.data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: 报表上下文环境、
 * @author: Tony.Zhang
 * @Date: 2017-08-11 11:23
 **/
public abstract class ReportContext {
    private int line; //统计轴类型 1：时间轴， 2：组织架构

    private boolean ratio = false; //报表输出值是否是率

    private IReportRowHandler handler;
    private IReportDataConvertor convertor;
    private IReportDataMatcher matcher;
    private Map<String,String> params  =new HashMap();

    private int dynamicIndicatorLevel = 0; //动态指标层级，根节点为1, 0表示没有动态指标
    private String dynamicIndicatorValues;//动态指标值，MM+MG | MM+smart
    private String dataGroupKeys;//分组统计时的key组合 ，例如：许可、品牌
    private String indicatorGroupKey;//分组指标在数据Map中的Key值
    private String orderName;

    public ReportContext() {
    }

    public int getLine() {
        return line;
    }

    public void setLine(int line) {
        this.line = line;
    }

    public IReportDataConvertor getConvertor() {
        return convertor;
    }

    public void setConvertor(IReportDataConvertor convertor) {
        this.convertor = convertor;
    }

    public IReportDataMatcher getMatcher() {
        return matcher;
    }

    public void setMatcher(IReportDataMatcher matcher) {
        this.matcher = matcher;
    }

    public Map<String, String> getParams() {
        return params;
    }

    public void setParams(Map<String, String> params) {
        this.params = params;
    }

    public int getDynamicIndicatorLevel() {
        return dynamicIndicatorLevel;
    }

    public void setDynamicIndicatorLevel(int dynamicIndicatorLevel) {
        this.dynamicIndicatorLevel = dynamicIndicatorLevel;
    }

    public String getDynamicIndicatorValues() {
        return dynamicIndicatorValues;
    }

    public void setDynamicIndicatorValues(String dynamicIndicatorValues) {
        this.dynamicIndicatorValues = dynamicIndicatorValues;
    }

    public String getDataGroupKeys() {
        return dataGroupKeys;
    }

    public void setDataGroupKeys(String dataGroupKeys) {
        this.dataGroupKeys = dataGroupKeys;
    }

    public String getIndicatorGroupKey() {
        return indicatorGroupKey;
    }

    public void setIndicatorGroupKey(String indicatorGroupKey) {
        this.indicatorGroupKey = indicatorGroupKey;
    }

    public boolean isRatio() {
        return ratio;
    }

    public void setRatio(boolean ratio) {
        this.ratio = ratio;
    }

    public abstract List<? extends ColumnUnit> getColumnUnits();

    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }

    public IReportRowHandler getHandler() {
        return handler;
    }

    public void setHandler(IReportRowHandler handler) {
        this.handler = handler;
    }
}
